﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HostelEmpFee.aspx.cs" Inherits="UI.ModMini.HostelEmpFee" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>每月住宿缴费</title>
          <link rel="stylesheet" type="text/css" href="../Styles/BaseStyle.css" />
           <script type="text/javascript" src="../JS/jsFunction.js"></script>
    <script type="text/javascript">
        function aclose(id, empcode, fyear, fmonth, fei) {
            var i = fmonth - 1;
            var j= fyear - 1998;
            this.document.forms[0].hidID.value = id;
            this.document.forms[0].txtEmpCode.value = empcode;
            this.document.forms[0].ddlYear.selectedIndex =j;
            this.document.forms[0].ddlMonth.selectedIndex = i;
            this.document.forms[0].txtFei.value = fei;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
     <div id="pagetop" class="pagetop">
        <div class="pagetopleft">
            <b>每月住宿缴费</b></div>
        <div class="pagetopright">
           
              <asp:Button ID="btnIn" runat="server" Text="批量导入" CssClass="ButtonCss"  />&nbsp;</div>
    </div>
    <div style="margin-left: 18px">
        <table  class="td">
        <tr>
            <td>
                员工编号</td>
            <td>
                <asp:TextBox ID="txtEmpCode" runat="server" CssClass="InputCss" Width="100px" 
                    TabIndex="1"
                   ></asp:TextBox>
                </td>
             <td>
                 年</td>
            <td>
               <asp:DropDownList ID="ddlYear" runat="server" CssClass="InputCss">
                    </asp:DropDownList> &nbsp;</td>
                       <td>
                           月</td>
            <td>
                <asp:DropDownList ID="ddlMonth" runat="server" CssClass="InputCss">
                </asp:DropDownList>
            </td>
       
        <td>
                费用</td>
            <td>
                <asp:TextBox ID="txtFei" runat="server" CssClass="InputCss" Width="80px" onkeydown="if(event.keyCode==13)event.keyCode=9" 
                    TabIndex="2"></asp:TextBox>
            </td>
           <td>
           <asp:Button ID="btnAdd" runat="server" Text="添加" CssClass="ButtonCss" Width="38px"
            OnClick="btnAdd_Click" />&nbsp;<asp:Button ID="btnUpdate" runat="server" Text="更新" CssClass="ButtonCss" Width="38px"
            OnClick="btnUpdate_Click" />
            &nbsp;<asp:Button ID="btnSearch" CssClass="ButtonCss"  runat="server" Text="查询"  Width="38px" OnClick="btnSearch_Click" />
            &nbsp;<asp:Button ID="btnDelete" CssClass="ButtonCss"  runat="server" Text="删除"  Width="38px" OnClick="btnDelete_Click" />

           </td>
         
        </tr>
        </table>
                </div>
    <br />

        <asp:GridView ID="gvList" runat="server" Width="95%" AutoGenerateColumns="False"
            HorizontalAlign="Center" BackColor="White" BorderColor="#999999" 
        BorderStyle="None" BorderWidth="1px" CellPadding="3" CssClass="td" GridLines="Vertical">
            <AlternatingRowStyle BackColor="#DCDCDC" />
            <Columns>
                
                <asp:TemplateField HeaderText="ID" SortExpression="ID">
                    <ItemTemplate>
                        <a style="cursor: hand" onclick="javascript:aclose('<%# Eval("ID") %>','<%# Eval("EmpCode") %>','<%# Eval("FYear") %>','<%# Eval("FMonth") %>','<%# Eval("Fei") %>')">
                            <%# Eval("ID")%></a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="工号" SortExpression="EmpCode">
                    <ItemTemplate>
                        <a style="cursor: hand" onclick="javascript:aclose('<%# Eval("ID") %>','<%# Eval("EmpCode") %>','<%# Eval("FYear") %>','<%# Eval("FMonth") %>','<%# Eval("Fei") %>')">
                            <%# Eval("EmpCode")%></a>
                    </ItemTemplate>
                </asp:TemplateField>
                 <asp:BoundField DataField="EmpName" HeaderText="姓名" SortExpression="EmpName">
                    <ItemStyle Width="70px" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="年份" SortExpression="FYear">
                    <ItemTemplate>
                         <a style="cursor: hand" onclick="javascript:aclose('<%# Eval("ID") %>','<%# Eval("EmpCode") %>','<%# Eval("FYear") %>','<%# Eval("FMonth") %>','<%# Eval("Fei") %>')">
                            <%# Eval("FYear")%></a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="月份" SortExpression="FMonth">
                    <ItemTemplate>
                        <a style="cursor: hand" onclick="javascript:aclose('<%# Eval("ID") %>','<%# Eval("EmpCode") %>','<%# Eval("FYear") %>','<%# Eval("FMonth") %>','<%# Eval("Fei") %>')">
                            <%# Eval("FMonth")%></a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="金额" SortExpression="Fei">
                    <ItemTemplate>
                        <a style="cursor: hand" onclick="javascript:aclose('<%# Eval("ID") %>','<%# Eval("EmpCode") %>','<%# Eval("FYear") %>','<%# Eval("FMonth") %>','<%# Eval("Fei") %>')">
                            <%# Eval("Fei")%></a>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />                      
                        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
                        <AlternatingRowStyle BackColor="#F7F7F7" />
        </asp:GridView>
       

        <asp:HiddenField ID="hidID" runat="server" />
       

    </form>
</body>
</html>
